<%
  #File :   /app/views/org_chart/index.rhtml
  #Author:  Andrew Stone
  #Created: 08.01.2006
%>
  
<%=start_large_div_wrapper%>
  <div id="page_title">Organizational Charts</div>
  <div id="large">
    <%=start_form_tag(:action => "index")%>
      <select name="group">
        <option/>
        <%
          cur = -1
          cur = params[:group].to_i if params[:group]
          @groups.each do |grp| %>
          <option value="<%=grp[:gid]%>" <%=(grp[:gid].to_s.to_i == cur ? "selected" :"")%>><%=grp[:name]%></option>
        <%
          end %>
      </select>
      <%=submit_tag("Select")%>
    <%=end_form_tag%>
  </div>
<%=end_div_wrapper%>
<%=render(:partial => "group_chart")%>
